home *** CD-ROM | disk | FTP | other *** search
/ Professional Soft Collection 1.02 / Professional Soft Collection 1.02.iso / qemm.80c / technote.qip / PARITY.TEC < prev    next >
Text File  |  1995-11-04  |  7KB  |  138 lines

  1.  
  2.                          Parity Errors
  3.  
  4.  Quarterdeck Technical Note #128             Filename: PARITY.TEC
  5.  by Bryan Scott                            CompuServe: PARITY.TEC
  6.  Last revised:  7/02/93                      Category: HW
  7.  
  8.  Subject: What hardware parity errors are, and some suggestions on
  9.           finding and correcting the problem.
  10.  
  11.  Q. What is a parity error?
  12.  
  13.  A. The memory controller chip on your PC reports a parity error
  14.     when it reads a byte of data and the 9 bits it used to encode
  15.     the byte do not add up to 1 (odd parity).  Parity errors are
  16.     always hardware-related.  Software applications cannot cause
  17.     parity errors, although an application may cause one to be
  18.     detected.
  19.  
  20.     In the digital world, all information is represented by the
  21.     binary numbers 0 and 1.  The binary digit, or bit, is the
  22.     fundamental building block of digital information in a
  23.     computer, and it stores information in two states:  off or on
  24.     (0 or 1, respectively).  One bit can make a big difference.
  25.     Here's why:
  26.  
  27.     The binary number for the letter U is:
  28.  
  29.     01010101
  30.  
  31.     If you change just the fourth bit over from the left, from one
  32.     state to the other, the binary number becomes the letter E.
  33.  
  34.     01000101
  35.  
  36.     Now while there are 8 bits in a byte, your memory controller
  37.     handles information 9 bits at a time.  This extra bit is called
  38.     a "parity bit", and is the computer's way to verify the
  39.     integrity of your data. Whenever you write data to memory, the
  40.     memory controller adds up the number of 1's in each byte of
  41.     information, and then sets the ninth bit to make the sum of all
  42.     nine bytes odd. IBM, the original designers of the PC, could
  43.     have chosen to make the sum of the nine bytes even (even
  44.     parity), but they chose to store data in memory with odd parity
  45.     and every other PC manufacturer followed suit.
  46.  
  47.     In the example above, the letter U has the binary value of
  48.     01010101, which has 4 1s in it, and the letter E is 01000101,
  49.     which has 3 1s in it.  When your PC reads each byte of data, it
  50.     sums the 9 bits to make sure the number of 1s in the byte is
  51.     still odd.  If the state of a single bit gets changed from 1 to
  52.     0, or 0 to 1, the parity of the nine bits becomes even and the
  53.     memory controller asserts the NMI (Non-Maskable Interrupt).
  54.     This signal is put directly on a pin of the CPU, then the code
  55.     pointed at by Interrupt 2 posts a Parity Error message, which
  56.     warns you that there is a problem with your RAM.
  57.  
  58.  Q. Why am I getting parity errors on my system since I installed
  59.     QEMM?
  60.  
  61.  A. As stated above, parity errors are indicative of a hardware
  62.     problem.  The error may appear since you've installed QEMM
  63.     because QEMM gives you and your applications access to memory
  64.     that may never have been used before, and which could be
  65.     marginally bad.
  66.  
  67.  Q. How do I determine which piece of hardware is causing the
  68.     problem?
  69.  
  70.  A. First, check is the RAM in your system.  An easy test is to
  71.     disable everything that uses EMS and XMS memory so you can
  72.     create a RAMDRIVE the size of all your system memory.  (Refer
  73.     to your DOS manual for information on creating a RAMDRIVE.)
  74.  
  75.     Then:
  76.  
  77.     a) Run CHKDSK on the RAMDRIVE, or
  78.     b) Copy files to the RAMDRIVE until it is full.
  79.  
  80.     Either way, if you have bad memory on your system, eventually
  81.     you will get a parity error or a General Drive Failure on the
  82.     RAMDRIVE.
  83.  
  84.     The first thing you can do to try to remedy this problem is to
  85.     make sure that the RAM chips are seated properly in their
  86.     sockets.  If they are DRAMs or SIPPs, make sure the pins aren't
  87.     broken off or bent.  If they are SIMMs or the memory is on a
  88.     card, you may just need to clean the contacts.  If the chips
  89.     physically check out ok, the chip speeds could be mismatched
  90.     with memory that is too slow for the CPU/memory bus, or a
  91.     controller chip could be bad.  At this point the only sure way
  92.     to test this is to swap out the chips for ones that you know
  93.     are good.
  94.  
  95.     Parity errors may also be caused by the presence of an
  96.     autoswitching video card or one that is using 16-bit ROM
  97.     access. Your motherboard could be assigning parity to the
  98.     address space where your EMS page frame is located.  Also there
  99.     may be some special features of the computer in the CMOS Setup
  100.     that could be causing problems.  Try disabling the computer's
  101.     shadowing of BIOS or video ROM or turning off memory caching or
  102.     other features to see if one of them is involved.  This may
  103.     allow you to pinpoint the cause of the problem. In all these
  104.     cases you should refer to the documentation that came with your
  105.     hardware product to disable a particular feature.
  106.  
  107.  Q. I ran a hardware diagnostic program on my machine, and it
  108.     didn't report bad memory.  Why not?
  109.  
  110.  A. While there are several diagnostic programs on the market that
  111.     will test your memory for errors, they may not duplicate
  112.     conditions that would cause marginal memory to fail.  Most are
  113.     not even designed to be run with a memory manager.  When parity
  114.     errors are encountered, it is time to have the hardware
  115.     components of the machine examined.
  116.  
  117.  Q. Is there any software I can use to get around this problem?
  118.  
  119.  A. No.  Note that all of the parity operations are performed
  120.     directly by your computer's hardware, regardless of which
  121.     operating system (DOS, OS/2, UNIX) you use and regardless of
  122.     which utility programs or application software you run.  One
  123.     exception is Macintosh computers, which use 8 bit SIMM chips
  124.     that do not have parity. When errors occur, the system just
  125.     malfunctions from the invalid data.  Also remember that parity
  126.     checking will only detect if one bit in a byte gets changed. If
  127.     two bits in the same byte get changed it will accurately
  128.     reflect that the sum is still odd and errors will not be
  129.     detected.
  130.  
  131.  ******************************************************************
  132.  *      Trademarks are property of their respective owners.       *
  133.  *   This and other technical notes may be available in updated   *
  134.  *     forms through Quarterdeck's standard support channels.     *
  135.  *          Copyright (C) 1995 Quarterdeck Corporation            *
  136.  ******************** E N D   O F   F I L E ***********************
  137.  
  138.